Fix /review permission prompt spam from sub-agent tool calls#1
Fix /review permission prompt spam from sub-agent tool calls#1artekr wants to merge 1 commit intoLangerrr:mainfrom
Conversation
The allowed-tools on the review command only auto-approves tools for the orchestrator, not for sub-agents spawned via Task. This caused every Grep, Read, and Bash call from each reviewer agent to trigger individual permission prompts with no "yes for session" option. Restructured to a pre-fetch pattern: the orchestrator gathers all data (file contents, diffs, CLAUDE.md, git blame/log) upfront and embeds it inline in each sub-agent's Task prompt. Sub-agents become pure text analyzers with zero tool calls and zero permission prompts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code reviewNice fix — the pre-fetch pattern is the right call for avoiding permission prompt spam. Two things I want to clarify:
Lines 30 to 31 in f81a2b0
zforge/agents/code-reviewer.md Lines 49 to 56 in f81a2b0 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
Hey! Great catch on the permission prompt spam — this was a real usability pain point. We went with a different approach on What changedEach reviewer now runs as an independent We also added:
Why not the pure text analyzer approach?It works well for small diffs, but zforge's primary use case is reviewing entire feature implementations (5-15+ files). Pre-fetching all that content into the orchestrator and passing it inline would consume too much context. Letting reviewers use their own tools keeps the orchestrator lightweight and lets each reviewer explore the codebase independently. The agent definition ( Thanks for surfacing this issue — it pushed us to a much better architecture! |
Summary
/reviewcommand constantly asks permission for every Grep, Read, and Bash call becauseallowed-toolsonly auto-approves tools for the orchestrator, not for sub-agents spawned via Task. There's no "yes for session" option, so users must approve each call individually.allowed-tools) gathers all data upfront (file contents, diffs, CLAUDE.md, git blame/log) and embeds it inline in each sub-agent's Task prompt. Sub-agents become pure text analyzers with zero tool calls.Bashfromcode-revieweragent tools since git data is now provided inline by the orchestrator.Test plan
/review --stagedon a repo with staged changes — verify no permission prompts from sub-agents/review <file>on a specific file — verify reviewers analyze without tool calls/review --feature <name>— verify git blame/log data is embedded correctly🤖 Generated with Claude Code